package com.huawei.appmarket.service.usercenter.personal.view.card;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import com.huawei.appgallery.foundation.store.bean.user.GetPersonalInfoResBean;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.cgz;
import o.ckt;
import o.der.e;
import o.der.f;
import o.ekg;
import o.eko;
import o.ele;

public class PersonalConsumeCard extends PersonalNormalCard implements OnClickListener {
    public PersonalConsumeCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        this.ʿ.setText(f.ʼʼ);
        ˏ(this.ˎ, e.ˋˋ);
        view.setOnClickListener(new ckt(this));
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        ˎ();
    }

    public void onClick(View view) {
        ˊ();
        ˋ();
        ˎ(0);
        ˎ(false);
    }

    protected void ˋ() {
        eko.ˊ(f.ʹ);
    }

    protected void ˊ() {
        new ele(this.ˊ).ˊ();
    }

    private void ˎ() {
        GetPersonalInfoResBean ˊ = ekg.ॱ().ˊ();
        if (ˊ == null || ˊ.ʻ() != 1) {
            ˎ(false);
        } else {
            ˎ(true);
        }
    }

    private void ˎ(int i) {
        GetPersonalInfoResBean ˊ = ekg.ॱ().ˊ();
        if (ˊ != null) {
            ˊ.ˏ(i);
        }
    }
}
